package cn.schoolwow.util.test.module.check.jsonarray.flow;

import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;
import cn.schoolwow.util.domain.check.jsonarray.CheckJSONArray;
import com.alibaba.fastjson.JSONArray;

public class CheckCheckJSONArrayProcessFlow implements BusinessFlow {
    @Override
    public void executeBusinessFlow(FlowContext flowContext) throws Exception {
        JSONArray optionArray = (JSONArray) flowContext.checkData("optionArray");

        CheckJSONArray.newCheck(optionArray)
                .containValueCheck("label", "未开始", "未开始标签");
    }

    @Override
    public String name() {
        return "检查JSONArray数组";
    }
}
